= simple_form_for resource, html: { id: 'user_form', class: 'w-form' } do |form|
  = hidden_field_tag :anchor, 'settings'
  div
    .w-container
      .w-col.w-col-10.w-col-push-1
        = render 'devise/shared/alert'
        .w-form.card.card-terciary.u-marginbottom-20
          .fontsize-base.fontweight-semibold Email
          .fontsize-small.u-marginbottom-20 Mantenha esse email atualizado pois ele é o canal de comunicação entre você, a equipe do Catarse e a equipe dos projetos que você apoiou. 
          .w-row.u-marginbottom-20
            .w-col.w-col-6.w-sub-col
              = form.input_field :email, as: :string, class: 'w-input text-field positive'
            .w-col.w-col-6

          .divider.u-marginbottom-20

          .fontsize-base.fontweight-semibold Endereço
          .fontsize-small.u-marginbottom-20 Esse é o endereço que foi informado ao realizar seu último apoio. Se você mudou de endereço, altere aqui e, caso você esteja aguardando alguma recompensa, avise por email ao realizador do projeto apoiado.
          .w-row  
            = form.association :country, as: :select, label_html:{class: 'field-label fontweight-semibold'}, wrapper_html: {class: 'w-col w-col-6 w-sub-col'}, input_html: {class: 'w-select positive', required: true}, required: true, label: 'País'
            .w-col.w-col-6
          .w-row
            = form.input :address_street, as: :string, label_html:{class: 'field-label fontweight-semibold'}, wrapper_html: {class: 'w-col w-col-6 w-sub-col'}, input_html: {class: 'w-input text-field positive', data: {required_in_brazil: true}}, validation_text: true
            .w-col.w-col-6
              .w-row
                = form.input :address_number, as: :tel, label_html:{class: 'field-label fontweight-semibold'}, wrapper_html:{class: 'w-col w-col-6 w-col-small-6 w-col-tiny-6 w-sub-col-middle'}, input_html: {class: 'w-input text-field positive'}, validation_text: true
                = form.input :address_complement, as: :string, label_html:{class: 'field-label fontweight-semibold'}, wrapper_html:{class: 'w-col w-col-6 w-col-small-6 w-col-tiny-6'}, input_html: {class: 'w-input text-field positive'}
          .w-row
            = form.input :address_neighbourhood, as: :string, label_html:{class: 'field-label fontweight-semibold'}, wrapper_html:{class: 'w-col w-col-6 w-sub-col'},input_html: {class: 'w-input text-field positive'}
            = form.input :address_city, as: :string, label_html:{class: 'field-label fontweight-semibold'}, wrapper_html:{class: 'w-col w-col-6'},input_html: {class: 'w-input text-field positive', data: {required_in_brazil: true}}, validation_text: true
          .w-row
            = form.input :address_state, as: :select, label_html:{class: 'field-label fontweight-semibold'}, collection: State.array, wrapper_html: {class: 'w-col w-col-6 w-sub-col'}, input_html: {class: "w-select text-field positive", data: {required_in_brazil: true}}, validation_text: true
            .w-col.w-col-6
              .w-row
                = form.input :address_zip_code, as: :tel, label_html:{class: 'field-label fontweight-semibold'}, wrapper_html: {class: 'w-col w-col-6 w-col-small-6 w-col-tiny-6 w-sub-col-middle'}, input_html: {class: 'w-input text-field positive', data: {required_in_brazil: true, fixed_mask: '99999-999'}}, validation_text: true  
                = form.input :phone_number, as: :tel, label_html:{class: 'field-label fontweight-semibold'}, wrapper_html: {class: 'w-col w-col-6 w-col-small-6 w-col-tiny-6'}, input_html: {class: 'w-input text-field positive', data: {required_in_brazil: true, fixed_mask: '(99) 9999-99999'}}, validation_text: true

          .divider.u-maginbottom-20

          .fontsize-base.fontweight-semibold Alterar minha senha
          .fontsize-small.u-marginbottom-20 Para que a senha seja alterada você precisa confirmar a sua senha atual.
          .w-row.u-marginbottom-20
            .w-col.w-col-6.w-sub-col
              label.field-label.fontweight-semibold for="email-20"  Senha atual
              = form.input_field :current_password, class: 'w-input text-field positive'
            .w-col.w-col-6
              label.field-label.fontweight-semibold for="email-21"  Nova senha
              = form.input_field :password, class: 'w-input text-field positive'

          .divider.u-marginbottom-20
          .fontweight-semibold.fontsize-smaller Desativar minha conta
          .fontsize-smallest Todos os seus apoios serão convertidos em apoios anônimos, seus dados não serão mais visíveis, você sairá automaticamente do sistema e sua conta será desativada permanentemente.
          = link_to 'Desativar minha conta no Catarse', resource, method: :delete, data: { confirm: 'Você deseja desativar essa conta?' }, class: 'alt-link fontsize-smaller'

    div
      .w-container
        .w-row
          .w-col.w-col-4
          .w-col.w-col-4
            = form.button :submit, 'Salvar',  class:'btn btn-large'
          .w-col.w-col-4
